﻿<!--
	@create by 
	@update by 
	@description 
-->
<div >
	<el-form-q :field-data= "queryFields" :buttons= "queryButtons" ></el-form-q>
	<div class= "yu-toolBar" >
		<el-button-group >
			<el-button icon="plus" @click="addFn" v-if="checkPermission('create')">新增</el-button>
			<el-button icon="edit" @click="modifyFn" v-if="checkPermission('edit')">修改</el-button>
			<el-button icon="document" @click="infoFn" v-if="checkPermission('detail')">查看</el-button>
			<el-button icon="yx-bin" @click="deleteFn" v-if="checkPermission('delete')">删除</el-button>
			<el-button icon="yx-cog" @click="configFn" v-if="checkPermission('config')">配置</el-button>
			<!-- <el-button icon="yx-cog" @click="configViewFn" v-if="checkPermission('detail')">配置查看</el-button> -->
			<!--<el-button icon="yx-cog" @click="copyFn" v-if="checkPermission('copy')">复制</el-button>-->
			<!--<el-button icon="yx-cog" @click="syncFn" v-if="checkPermission('copy')">同步</el-button>-->
		</el-button-group>
	</div>
	<el-table-x ref= "reftable" :row-index= "true" :data-url= "dataUrl" :table-columns= "tableColumns" :request-type= "'POST'" ></el-table-x>
	
	<!-- 说明dialog可配置宽高属性，若不配置则宽度默认为屏幕50%，高度自适应 width="650px" height="380px" -->
	<el-dialog-x :title= "viewTitle[viewType]" :visible.sync= "dialogVisible" width= "750px" >
		<el-form-x ref= "reform" :group-fields= "updateFields" :buttons= "updateButtons" :disabled= "formDisabled" label-width= "120px" ></el-form-x>
	</el-dialog-x>

	<el-dialog-x :title="cfgTitle" :visible.sync="cfgDialogVisible" size="full" v-if="cfgDialogVisible">
	    <el-tabs v-model="tabName">
	        <el-tab-pane label="业务流转基础配置" name="baseCfg">
	            <el-row >
		            <el-col :span= "5" >
		                <el-tree-x ref="cfgTree" :height="height - 20" @node-click="nodeClickFn" 
		                       :data-url="treeDataUrl" data-id="nodeId" data-label="nodeName" :data-params="treeParam" :root-visible="true"
		                       data-pid="parentNodeId" :data-root="dataRoot" style="margin:10px 10px 0 0;">
		                </el-tree-x>
		            </el-col>
		            <el-col :span="19" >
		                 <div id="cfgInfo"></div>
		            </el-col>
		        </el-row>
	        </el-tab-pane>
	        <el-tab-pane label="业务流转事件配置" name="eventCfg">
	             <el-row>
                    <el-col :span= "5" >
                        <el-tree-x ref="eventCfgTree" :height="height - 20" @node-click="eventNodeClickFn" 
                               :data-url="eventTreeDataUrl" data-id="nodeId" data-label="nodeName" :data-params="eventTreeParam" :root-visible="true"
                               data-pid="parentNodeId" :data-root="dataRoot" style="margin:10px 10px 0 0;">
                        </el-tree-x>
                    </el-col>
                    <el-col :span="19" >
                         <div id="eventCfgInfo"></div>
                    </el-col>
                </el-row>
	        </el-tab-pane>
	    </el-tabs>
	</el-dialog-x>
	
	<!--用于复制flow的对话框-->
	<el-dialog :title= "'复制'" :visible.sync= "copyDialogVisible" size="small" v-if="copyDialogVisible">
		<el-form-x ref= "copyForm" :group-fields= "copyUpdateFields" :buttons= "copyUpdateButtons" label-width= "120px" ></el-form-x>
	</el-dialog
	>
	<!--用于同步flow的对话框-->
	<el-dialog title="将源业务流程到目标业务流程" :visible.sync="syncDialogVisible" size="small" v-if="syncDialogVisible">
		<el-form-x ref="syncForm" :group-fields="syncUpdateFields" label-width="120px" ></el-form-x>
		<span slot="footer" class="dialog-footer">
			<el-button @click="syncDialogVisible = false">取 消</el-button>
			<el-button type="primary" @click="sureSyncFn" :loading="syncSureBtn">确 定</el-button>
		</span>
	</el-dialog>
</div>
